/**
 * 计数器
 */
public class CountHelper {

    CountHelper(int count) {
        this.count = count;
        this.hasComplete = 0;
    }

    private final int count;

    private int hasComplete;

    public synchronized void add() {
        this.hasComplete++;
    }

    public void print() {
        System.out.println("进度: " + this.hasComplete + "/" + this.count);
    }
}
